import $http from "./request";
import qs from 'qs'
// 登录
export function loginByPwd(data) {
    return $http({
        url: '/login/loginByPwd',
		method: 'post',
		data:qs.stringify(data)
    })
}

// 轮播图
export function bannerPic() {
    return $http({
        url: '/desktop/bannerPic',
		method: 'get'
    })
}
// 党建资讯
export function newsInfo() {
    return $http({
        url: '/desktop/newsInfo',
		method: 'get'
    })
}

// 首页活动
export function onlineActivity() {
    return $http({
        url: '/desktop/onlineActivity',
		method: 'get'
    })
}

// 首页课程
export function onlineClass() {
    return $http({
        url: '/desktop/onlineClass',
		method: 'get'
    })
}

// 首页友情链接
export function linkList() {
    return $http({
        url: '/pcLinks/linkList',
		method: 'get'
    })
}

// 首頁個人中心
export function personalCenter() {
    return $http({
        url: '/desktop/personalCenter',
		method: 'get'
    })
}

// 最新党课
export function courseList(params) {
    return $http({
        url: '/course/courseList',
		method: 'get',
		params
    })
}

// 党课详情
export function courseInfo(data) {
    return $http({
        url: '/course/courseInfo',
		method: 'post',
		data:qs.stringify(data)
    })
}

// 党课视频课程小节播放完成
export function finishChapter(data) {
    return $http({
        url: '/course/finishChapter',
		method: 'post',
		data:qs.stringify(data)
    })
}

// 线上活动
export function activityManage(params) {
    return $http({
        url: '/activityManage/list',
		method: 'get',
		params
    })
}

// 线上活动详情
export function activityManageDetail(params) {
    return $http({
        url: '/activityManage/detail',
		method: 'get',
		params
    })
}

// 一季一考
export function paperList(params) {
    return $http({
        url: '/exam/paperList',
		method: 'get',
		params
    })
}

// 考试详情
export function examNote(params) {
    return $http({
        url: '/exam/examNote',
		method: 'get',
		params
    })
}

// 考试题目详情
export function examInfo(params) {
    return $http({
        url: '/exam/examInfo',
		method: 'get',
		params
    })
}
// 获取试题
export function examSubject(params) {
    return $http({
        url: '/exam/examSubject',
		method: 'get',
		params
    })
}
// 提交试卷
export function commitExam(data) {
    return $http({
        url: '/exam/commitExam',
		method: 'post',
		data:qs.stringify(data)
    })
}
// 党建发布
export function affairsList(params) {
    return $http({
        url: '/blackOpen/affairsList',
		method: 'get',
		params
    })
}

// 党建发布详情
export function affairsDetail(params) {
    return $http({
        url: '/blackOpen/detail',
		method: 'get',
		params
    })
}

// 党建公开
export function balckList(params) {
    return $http({
        url: '/blackOpen/balckList',
		method: 'get',
		params
    })
}

// 党建公开详情
export function balckDetail(params) {
    return $http({
        url: '/blackOpen/detail',
		method: 'get',
		params
    })
}

// 党务报告
export function reportList(params) {
    return $http({
        url: '/dwReport/reportList',
		method: 'get',
		params
    })
}

// 党务报告详情
export function reportDetail(params) {
    return $http({
        url: '/dwReport/reportDetail',
		method: 'get',
		params
    })
}

// 个人中心
export function getUserInfo(params) {
    return $http({
        url: '/login/getUserInfo',
		method: 'get',
		params
    })
}


